{% extends "admin/admin_page.html" %}

{% load trix_translations %}

{% block content %}
<div class="container-fluid">
	<div class="row-fluid">
		<h1>{{ pillar }}</h1>
	</div>
	<div class="row-fluid">
		<div class="span4">
			
			<dl class="dl-horizontal">
				<dt>{% translate "admin_pillar_freebase_id" %}</dt>
				<dd>{{ pillar.fb_id }}</dd>
				{% if pillar.image_url %}
					<dt>{% translate "admin_pillar_image" %}</dt>
					<dd>
						<a href="{{ pillar.image_url }}">
							<img src="{{ pillar.image_thumbnail }}" alt="{{ pillar }}">
						</a>
					</dd>
				{% endif %}
				<dt>{% translate "admin_pillar_categories" %}</dt>
				<dd>
					{% if pillar.categories %}
						<ul>
							{% for category in pillar.categories %}
								<li>{{ category }}</li>
							{% endfor %}
						</ul>
					{% endif %}
				</dd>
				{% if pillar.short_description %}
					<dt>{% translate "admin_pillar_short_description" %}</dt>
					<dd>{{ pillar.short_description }}</dd>
				{% endif %}
				{% if pillar.long_description %}
					<dt>{% translate "admin_pillar_long_description" %}</dt>
					<dd>{{ pillar.long_description|linebreaks }}</dd>
				{% endif %}
				<dt>Importance</dt>
				<dd>{{ pillar.importance }}</dd>
				{% if pillar.context_url %}
					<dt>{% translate "admin_pillar_context_url" %}</dt>
					<dd>{{ pillar.context_url }}</dd>
				{% endif %}
				{% if pillar.defection_url %}
					<dt>{% translate "admin_pillar_defection_url" %}</dt>
					<dd>{{ pillar.defection_url }}</dd>
				{% endif %}
				<dt>{% translate "admin_pillar_state" %}</dt>
				<dd>{{ pillar.state }}</dd>
				{% if pillar.state = "Defected" %}
					<dt>{% translate "admin_pillar_defection_date" %}</dt>
					<dd>{{ pillar.defection_date }}</dd>
				{% endif %}
			</dl>

		</div>

		<div class="span2">
			<a class="btn btn-primary" href="{% url admin_pillar_edit pillar.id %}">{% translate "admin_pillar_edit_button" %}</a>
		</div>
	</div>
</div>
{% endblock %}
